package com.ruiyian.web.controller.system;

import com.ruiyian.common.core.controller.BaseController;
import com.ruiyian.common.core.page.TableDataInfo;
import com.ruiyian.system.domain.IceDetect;
import com.ruiyian.system.service.IceDetectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author chong
 * @email 673426164@qq.com
 * @create 2022/6/20
 * Desc: 文件档案
 */
@RestController
@RequestMapping("/system/Ice")
public class IceDetectController extends BaseController{

    @Autowired
    private IceDetectService iceDetectService;

    /**
     * 分页查询
     * @param icedetect
     * @return
     */
    @GetMapping("/list")
    public TableDataInfo list(IceDetect icedetect)
    {
        startPage();
        List<IceDetect> list = iceDetectService.list(icedetect);
        return getDataTable(list);
    }

    /**
     * 插入内容
     * @param icedetect
     * @return
     */
    @GetMapping("/new")
    public void save(@RequestBody IceDetect icedetect)
    {
        iceDetectService.save(icedetect);
        System.out.println(icedetect);
    }

    @RequestMapping("delete")
    public void delete(Long id){
        iceDetectService.delete(id);
    }




}
